$(function () {
    //加载表格数据
    $('#grid').datagrid({
        singleSelect: true,
        pagination: true,
        fitColumns: true,
        url: 'storedetail_listByPage',
        columns: [[
            {field: 'uuid', title: '编号'},
            {field: 'storeName', title: '仓库编号'},
            {field: 'goodsName', title: '商品编号'},
            {field: 'num', title: '数量'}
        ]]
    });


    //点击查询按钮
    $('#btnSearch').bind('click', function () {
        var formData = $('#searchForm').serializeJSON();
        $('#grid').datagrid('load',formData);
    });
})
